<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://"
          + request.getServerName() + ":" + request.getServerPort()
          + path + "/";
%>
<html>
<head>
  <base href="<%=basePath%>">
  <title>主页</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <!-- 引入 Bootstrap -->
  <link rel="stylesheet" href="css/bootstrap4.min.css" />
</head>
<body>

<div class="container">
  <div class="row clearfix">
    <div class="col-md-12 column">
      <div class="page-header">
        <h1>
          <small class="text-muted">&nbsp;&nbsp;欢迎登录学生选课系统</small>
        </h1>
        <hr/>
      </div>
    </div>
  </div>
</div>
<div class="container">
  <div class="row">
    <div class="col-md-9 column">
      <h2><small class="text-muted">课程列表 -- 显示所有课程</small></h2>
    </div>
    <div class = "col-md-3 column">
      <div class="btn-group">
        <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" >绑定学生</button>
        <form action="${pageContext.request.contextPath}/user/bind" class="dropdown-menu p-3" style="width:240px;">
          <div class="form-group">
            <label for="">学号：</label>
            <input name="stu_id" type="text" class="form-control" placeholder="学号">
          </div>
          <button type="submit" class="btn btn-primary">绑定</button>
        </form>
      </div>
      <div class="btn-group">
        <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" data-display="static">账号管理</button>
        <div class="dropdown-menu dropdown-menu-lg-right">
          <a class="dropdown-item" href="${pageContext.request.contextPath}/user/gomodify"> 修改密码 </a>
          <a class="dropdown-item" href="${pageContext.request.contextPath}/user/logout"> 注销账号 </a>
          <a class="dropdown-item" href="${pageContext.request.contextPath}/student/getstuinfo"> 学生信息 </a>
        </div>
      </div>
      <br/>
      <span style="color: red">${error_msg}</span>
    </div>
  </div>
</div>
<br/>
<div class="container">
  <div class="row">
    <table class="table">
      <!-- <caption>List of users</caption> -->
      <thead>
      <tr>
        <th>#</th>
        <th>课程号</th>
        <th>课程名称</th>
        <th>授课老师</th>
        <th>课程种类</th>
        <th>操作</th>
      </tr>
      </thead>
      <tbody>
<%--      <c:forEach var="" items="">--%>
<%--      </c:forEach>--%>
      </tbody>
    </table>
  </div>
</div>
  <script src="js/jquery.min.js"></script>
  <script src="js/bootstrap4.bundle.min.js"></script>
  <script src="js/bootstrap4.min.js"></script>
</body>
</html>
